POST New Live Video
Overview
The table below provides key details about the POST
method to create a new Live Video.
POST New Live Video | |
---|---|
Method | POST |
URL or Endpoint | /api/v1/projectId /live-videos |
Headers | Authorization |
Parameters | projectId |
Request Body | Title, Description, ChannelId, PublishDate |
The description of the URL parameter is as follows:
projectId URL Parameter | |
---|---|
URL Parameter Name | projectId |
Mandatory | Yes |
Type | string |
Description | Unique Id of the project. |
Request Body
The description of the body parameters is as follows:
Parameter Name | Mandatory | Type | Description |
---|---|---|---|
Title | Yes | string | Title of the live video. |
Description | No | string | Description of live video. |
ChannelId | Yes | string | Unique identifier of the channel. |
PublishDate | No | string | Indicates the date and time when the live video is created. |
Response
{
"success": true,
"errors": [],
"messages": [],
"result": {
"publicId": "{videoId}",
"id": "{videoId}",
"name": null,
"title": "{title}",
"description": "{description}",
"playbackUrl": "https://cdn.vpplayer.tech/{projectId}/hub/{hub}/index.m3u8",
"thumbnail": "https://cdn.vpplayer.tech/{projectId}/images/{image}/live-thumbnail.jpg",
"channelPublicId": "{channelId}",
"channelName": "{channelName}",
"channelTitle": "{channelTitle}",
"liveStatus": null,
"author": "{Author}",
"publishDate": "2024-05-23T10:00:00Z",
"publishEndDate": "2024-07-29T11:22:59.819Z",
"canCutAndPublish": true,
"canStopAndCut": true
},
"resultInfo": null,
"statusCode": 200
}
Information about the fields that appear when you receive the response are displayed in the table below.
Field Name | Type | Description |
---|---|---|
success | bool | If the response is successful it will return true. Otherwise will return false. |
errors | array[] | Indicates if there was an error. |
messages | array[] | Returns the response message from back-end. |
result | array[Object] | Returns the response object. |
publicId | string | Returns the public identifier for the live video |
id | string | Returns the identifier of the live video |
name | string | Returns a guid that is randomly generated |
title | string | Returns title of live video |
description | string | Returns description of live video |
playbackUrl | string | Returns a file URL where the livestream can be accessed for playback |
thumbnail | string | Returns the URL file for live video's thumbnail |
channelPublicId | string | Indicates the unique identifier of channel that is related with live video |
channelName | string | Indicates the name of the channel |
channelTitle | string | Returns title of the channel |
liveStatus | string | Returns current status of live video |
author | string | Returns the author of the live video |
publishDate | string($date-time) | Returns date and time when the video was created |
publishEndDate | string($date-time) | The date and time when the publication of the video is set to end. |
canCutAndPublishh | bool | Returns a value indicating if the video can be cut and published |
canStopAndCut | bool | Returns a value indicating if the video can be stopped and cut |
resultInfo | string | Returns extra information about the result. |
statusCode | integer($int32) | Returns the HTTP Status Code. |
If the action is successful, the service sends back an HTTP 200 or 201 response.
Errors
For information about the errors that are common to all actions, see Common Errors:
HTTP Status Code 400: Bad Request
HTTP Status Code 401: Unauthorized
HTTP Status Code 403: Forbidden
HTTP Status Code 404: Result Not Found
HTTP Status Code 500: Internal Server Error
HTTP Status Code 503: Backend Fetch Failed